<template>
    <div class="pkImg">
        <van-image
                v-on="$listeners"
                v-bind="$attrs">
            <template v-slot:loading>
                <van-loading type="spinner" size="20" />
            </template>
            <template v-slot:error>
                <div class="imgWrap">
                    <img :src="require('@img/load-fail.png')" alt="icon">
                </div>
            </template>
        </van-image>
    </div>
</template>

<script>
    export default {
        name: "pkImg",
    }
</script>

<style lang="scss" scoped>
    .pkImg {
        line-height: 0;
        /deep/.van-image__error {
            position: relative !important;
        }
        .imgWrap {
            font-size: 0;
            img {
                max-width: 100%;
            }
        }
    }
</style>
